#ifndef __FIFO_H
#define __FIFO_H

#include <stdint.h>
#include <pthread.h>
//max 2^16
#include "spumedia_config.h"

struct state_s {
    uint16_t front;
    uint16_t end;
};


struct fifo_s {

    uint32_t *task_fifo;

    uint32_t *ack_fifo;

    uint32_t current_pos;

   // uint32_t entry_count;

    uint32_t fifo_ptr;

    pthread_mutex_t mutex;

};

struct ack_entry_s {
    uint32_t entry;
    uint32_t handle;
};

struct ack_ring_s {
    uint32_t *ring;
    struct ack_entry_s *poll_point;
};



#endif